package com.example.demo.controller;

import com.example.demo.pojo.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-28
 * Time: 16:03
 */
@RestController
public class TestController {
    @Autowired
    private UserService userService;

    @GetMapping("/test")
    public List<User> getAllUser() {
        List<User> allUser = userService.findAllUser();
        return allUser;
    }
}
